package work03;

import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.ObjectInputStream;

public class objectread_ {
    public static void main(String[] args) throws IOException, ClassNotFoundException {
        String pathname="d:\\dog.dat";
        ObjectInputStream objectInputStream=new ObjectInputStream(new FileInputStream(pathname));
        System.out.println((Dog)objectInputStream.readObject());
    }
}
